/**
 * Created by levy on 16/6/21.
 * o2o 商城常量
 */

export const shopping = {
    imgPre: lf.prod ?
        'third.h5.liefengtech.com/lfshop/' :
        '192.168.9.7/lfshop/',
        // 'liefengtech.imwork.net/lfshop/',

    api: {
        prefix: lf.prod ?
            'o2o.prod.liefengtech.com' :
            'o2o.test.liefengtech.com',

        index: '/api/o2o/goods/getCategory',
        itemList: '/api/o2o/goods/listByCatId',
        itemDetail: '/api/o2o/goods/getGoodsDetail',
        attrDetail: '/api/o2o/goods/getGoodsAttrDetail',

        cart: {
            addGoods: '/api/o2o/order/addGoods2Cart',
            delGoods: '/api/o2o/order/deleteCartGoods',

            //增加购物车商品数量（默认一次加1
            incrGoods: '/api/o2o/order/incrCartGoodsNum',

            //减少购物车商品数量（默认一次减1）
            descGoods: '/api/o2o/order/descCartGoodsNum',

            listCartGoods: '/api/o2o/order/listCartGoods',
            
            getGoodsNum: '/api/o2o/order/getGoodsNum4Cart',
        },

        order: {
            create: '/api/o2o/order/createOrder', //post

            cancel: '/api/o2o/order/cancelOrder', //post
            
            delete: '/api/o2o/order/deleteOrder', //post

            //所有订单
            listAll: '/api/o2o/order/listAllOrder',

            //待付款订单
            listNotPay: '/api/o2o/order/listPendingOrder',

            //待收货
            listShipping: '/api/o2o/order/listShippedOrder',

            //待退货/退款
            listRefund: '/api/o2o/order/listRefundOrder',
            
            //待评价
            listUnevaluated: '/api/o2o/order/listNotEvaluatedOrder',

            detail: '/api/o2o/order/orderDetail',

            // 用户订单数量统计
            count: '/api/o2o/order/statOrderCount',
            
            // 确认收货
            confirmReceived: '/api/o2o/order/confirmReceipt',
        },

        address: {
            //查询收货地址列表
            list: '/api/o2o/user/listUserAddress',
            
            //查询详情
            detail: '/api/o2o/user/viewUserAddress',

            //保存或更新
            save: '/api/o2o/user/saveUserAddress',

            delete: '/api/o2o/user/deleteUserAddress',

            setDefault: '/api/o2o/user/changeDefaultAddress',
        }
    },
};

